<%@page import="com.spartancoder.accommodation.beans.PlaceBean" %>
<%@page import="com.spartancoder.accommodation.models.Place" %>
<%
PlaceBean pb = Place.fetch(Integer.parseInt(request.getParameter("id")));
pb.setAvailable(!pb.isAvailable());
Place.update(pb);
session.setAttribute("flash", "Starea caminului a fost schimbata");
response.sendRedirect("list-place.jsp");
%>